{template 'common/header'}
<div class='container'
	style='padding: 0 5px 10px; margin: 0; width: 100%'>
	<ul class="nav nav-tabs">
		<li class="active"><a href="{php echo $this->createWebUrl('sysset',array('op'=>'display'));}">参数设置</a></li>
	</ul>

	<div class="alert alert-info">
		<h4><i class="fa fa-info-circle"></i>绑定公众号，商家接收通知</h4>
		1). 添加微信账号管理员需要您的公众号号为: 认证订阅号 或 认证服务号<br>
		2). 因为添加店员是通过粉丝昵称搜索相应店员的信息,所以添加店员之前,需要
		<a href="{php echo url('mc/fans');}" target="_blank">下载粉丝列表</a> &
		<a href="{php echo url('mc/fans');}" target="_blank">更新粉丝信息</a> &
		<a href="{php echo url('mc/fangroup');}" target="_blank">更新粉丝分组</a><br>
		3). 当有新房产信息时,系统会通过该公众号给客服发送信息
	</div>
	<form class="form-horizontal" action=""   method="post">
	<div class="panel panel-success">
		<div class="panel-heading">参数设置</div>
		<div class="panel-body">

				<input type="hidden" id="isoauth_hid" name="status_hid" value="{$set['isoauth']}"/>
				<input type="hidden" id="isshow_hid" name="isshow_hid" value="{$set['isshow']}"/>
				<div class="form-group" >
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">引导关注</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="guanzhuUrl" class="form-control" value="{$set['guanzhuUrl']}" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">前端是否只显示经纪人信息</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="isshow" value="0" id="form-broker-0"{if $set['isshow']==0}checked="true"{/if} />是
						<input type="radio" name="isshow" value="1" id="form-broker-1"{if $set['isshow']==1}checked="true"{/if} />否
						<span class="help-block">如果开启，房产详情页面只显示经纪人信息，不显示个人信息。</span>
					</div>
				</div>

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否开启审核</label>
					<div class="col-sm-9 col-xs-12">
						<input type="radio" name="isadjuest" value="0" id="isadjuest-0"{if $set['isadjuest']==0}checked="true"{/if} />是
						<input type="radio" name="isadjuest" value="1" id="isadjuest-1"{if $set['isadjuest']==1}checked="true"{/if} />否
					</div>
				</div>

				<div class="form-group" id="jjrmobile_div">>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">经纪人联系电话</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="jjrmobile" class="form-control" value="{$set['jjrmobile']}" />
					</div>
				</div>
				<div class="form-group" id="jjr_div">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">经纪人</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="broker" class="form-control" value="{$set['broker']}" />
					</div>
				</div>
				
				<div class="form-group" id="jjr_div">>
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">默认城市</label>
					<div class="col-sm-9 col-xs-12">
						<input type="text" name="defcity" class="form-control" value="{$set['defcity']}" />
					</div>
				</div> 

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">新楼盘分享图片</label>
                    <div class="col-sm-9">
                    {php echo tpl_form_field_image('newflat_images', $set['newflat_images'])}
					<span class="help-block">
						建议图片大小为： 720*280
						比如：<img src="../addons/amouse_house/ui/images/new_flat.jpg" width="180px" height="70px;">
					</span>
                    </div>
                </div>
                <div class="form-group" >
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">版权信息</label>
                    <div class="col-sm-9 col-xs-12">
                        <input type="text" name="copyright" class="form-control" value="{$set['copyright']}" />
                        <span class="help-block">
						如果没空的话，默认是本公众号
					</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">第三方统计代码</label>
                    <div class="col-sm-9 col-xs-12">
                        <textarea  name="cnzz" class="form-control"  cols="50">{$set['cnzz']}</textarea>
                     <span class="help-block"> 借助第三方统计代码,如百度,量子,51la,chinaz</span>
                    </div>
                </div>

		</div>
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">发送客服消息（只支持认证服务号）</div>
		<div class="panel-body">
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">商家接收通知微信昵称</label>

				<div class="col-sm-9 col-xs-9 col-md-9">
					<input type="text" class="form-control" name="nickname" value="{$set['nickname']}">

					<div class="help-block">请填写微信昵称。</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">商家接收通知微信openid</label>

				<div class="col-sm-9 col-xs-9 col-md-9">
					<input type="text" class="form-control" name="openid" value="{$set['openid']}">

					<div class="help-block">请填写上面昵称对应的openid。</div>
				</div>
			</div>
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<input name="token" type="hidden" value="{$_W['token']}" />
			<button type="submit" class="btn btn-success col-sm-2" name="submit" value="提交">
				<i class="fa fa-check-circle"></i> 提交
			</button>
		</div>
	</div>
	</form>
</div>
<script>
	$(function(){
		$("#form-broker-{php echo $set['isshow'];}").attr("checked", true);
		var isshow_hid =$("#isshow_hid").val();
		if(isshow_hid==1){
			$("#jjrmobile_div").hide();
			$("#jjr_div").hide();
		}
		$("input[name='isshow']").on("change", function(){
			var type = $("input[name='isshow']:checked").val();
			//不弹出
			if(type == 0) {
				$("#jjrmobile_div").show();
				$("#jjr_div").show();
			} else {
				$("#jjrmobile_div").hide();
				$("#jjr_div").hide();
			}
		});
	});



</script>
